﻿import numpy as np
import matplotlib.pyplot as plt

MATH_INPUT_ARRAY_LEN = 64

# input.
arm_math_input_V2_f32 = []
for i in range(MATH_INPUT_ARRAY_LEN):
    arm_math_input_V2_f32.append(0.1 * i + 0.1)

in_x = np.array(arm_math_input_V2_f32)

# output.
out_sqrt = np.sqrt(in_x)
out_sqrt_inv = np.ones(MATH_INPUT_ARRAY_LEN) / out_sqrt

# display
print('sqrt()')
print(out_sqrt)
print("sqrt_inv()")
print(out_sqrt_inv)
fig, axs = plt.subplots(1,2)
axs[0].plot(in_x, out_sqrt,  color='red', marker='.')
axs[1].plot(in_x, out_sqrt_inv, color='green', marker='.')
plt.show()

